<template>
  <div class="about">
      <div>
          <form id="form">
              <div>登录名/uid:</div>
              <div><el-input type="text" v-model="user.loginName" placeholder=""/></div>
              <div>密码:</div>
              <div><el-input type="password" v-model="user.password" placeholder=""/></div>
              <a @click="login">登陆</a>
          </form>
          其他操作:
          <br/>
          <a href="register">注册账户</a>
      </div>
  </div>
</template>
<script>
import {login} from "@/api/userApi";

export default {
    name:'Login',
    data() {
        return {
            user:{
                loginName:'',
                password:''
            }
        }
    },
    methods:{
        login() {
            login(this.user).then(res=>{
                console.log('login',this.user,res)
            })
        }
    }
}
</script>
<style>
@media (min-width: 1024px) {
  .about {
    min-height: 100vh;
    display: flex;
    align-items: center;
  }
}
</style>
